package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloudkinto.bo.order.inbound.AcceptGoodsDetailQueryBo;
import com.cloudkinto.bo.order.inbound.AcceptGoodsQueryBo;
import com.cloudkinto.bo.order.inbound.OrderInputQueryBo;
import com.cloudkinto.dto.home.HomeOrderDto;
import com.cloudkinto.dto.home.HomeTodoData;
import com.cloudkinto.dto.order.inbound.OrderInputProductTransitDto;
import com.cloudkinto.entity.OrderInputDo;
import com.cloudkinto.vo.api.OrderInputListApiBoxInfoVo;
import com.cloudkinto.vo.common.ListPageStatusStaDto;
import com.cloudkinto.vo.order.inbound.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 到货通知单（订单入库） Mapper 接口
 * </p>
 *
 * @author long
 * @since 2024-11-04
 */
public interface OrderInputDao extends BaseMapper<OrderInputDo> {
    List<OrderInputProductTransitDto> getTransitProductList(@Param("map") Map<String, Object> map);

    List<HomeOrderDto> getHomeOrderDto(@Param("map") Map<String, Object> map);

    /**
     * 首页统计
     */
    List<HomeTodoData> getOrderCount(@Param("map") Map<String, Object> map);

    /**
     * 首页统计
     */
    List<HomeTodoData> getHomeTodoData(String source, Long userId, Long companyId, Long whId, Long tenantId);

    List<OrderInputListVo> getListPage(@Param("bo") OrderInputQueryBo bo);

    List<ListPageStatusStaDto> getListPageStatusSta(@Param("bo") OrderInputQueryBo bo);

    List<OrderInputListProductVo> getBoxProductList(@Param("ids") List<Long> ids);

    List<OrderInputListApiBoxInfoVo> getBoxProductListApi(@Param("ids") List<Long> ids);


    List<OrderInputListProductVo> getBoxProductListByBoxTypeNumber(@Param("boxTypeNumber") String boxTypeNumber, @Param("companyId") Long companyId);

    /**
     * 入库单扫描
     *
     * @param condition 查询条件
     * @return 扫描结果
     */
    List<OrderScanResultVo> scan(String condition);

    OrderInputAcceptGoodsOrderDetailVo acceptGoodsDetail(@Param("bo") AcceptGoodsDetailQueryBo bo);

    List<OrderInputAcceptGoodsBoxListVo> acceptGoodsListPage(@Param("bo") AcceptGoodsQueryBo bo);
}
